package com.wx.fresh.business.controller;

import com.wx.fresh.business.vo.businessVo.BusinessLoginVo;
import com.wx.fresh.business.vo.businessVo.BusinessRealNameAuthenticationVo;
import com.wx.fresh.business.vo.businessVo.BusinessRegisterVo;
import com.wx.fresh.common.util.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 商家权限
 */
@Api(tags = "商家登录注册及认证")
@RestController
@RequestMapping("business/auth")
public class AuthController {


    //商家登录
    @PostMapping("/login")
    @ApiOperation(value = "商家登录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "form"),
            @ApiImplicitParam(name = "password", value = "密码", required = true, paramType = "form"),
            @ApiImplicitParam(name = "code", value = "验证码", required = true, paramType = "form"),
    })
    public CommonResult login(BusinessLoginVo businessLoginVo) {
        return null;
    }

    //商家注册
    @PostMapping("/register")
    @ApiOperation(value = "商家注册")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "form"),
            @ApiImplicitParam(name = "password", value = "密码", required = true, paramType = "form"),
            @ApiImplicitParam(name = "confirmPassword", value = "确认密码", required = true, paramType = "form"),
            @ApiImplicitParam(name = "code", value = "验证码", required = true, paramType = "form")
    })
    public CommonResult businessRegister(BusinessRegisterVo businessRegisterVo) {
        return null;
    }

    //实名认证֤
    @PostMapping("/realNameAuthentication")
    @ApiOperation(value = "实名认证")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "姓名", required = true, paramType = "form"),
            @ApiImplicitParam(name = "certificateNumber", value = "身份证号", required = true, paramType = "form"),
            @ApiImplicitParam(name = "phone", value = "手机号", required = true, paramType = "form"),
            @ApiImplicitParam(name = "code", value = "验证码", required = true, paramType = "form")
    })
    public CommonResult realNameAuthentication(BusinessRealNameAuthenticationVo businessRealNameAuthenticationVo) {
        return null;
    }
}
